<?php
  // esta fun��o quando usada para compor uma string de texto que define uma string
  // js deve substituir \n por \\n.
  function partial2Js($partial,$values = array(),$escapeDoubleQuotes = true) {
    $renderedResult =
        $escapeDoubleQuotes ?
              str_replace('"','\"',get_partial($partial,$values)) :
              get_partial($partial,$values);
    return
      //utf8_encode(
        str_replace(
          "\r",
          '',
          str_replace(
            "\n",
            "",
            $renderedResult
          )   
        );
      //); 
  }

  function partial2Json($partial,$values = array()) {
    return get_partial($partial,$values);
  }

  function component2Js($module, $action, $values = array(),$escapeDoubleQuotes = true) {
    $renderedResult =
        $escapeDoubleQuotes ?
              str_replace('"','\"',get_component($module, $action, $values)) :
              get_component($module, $action, $values);
    return
      //utf8_encode(
        str_replace(
          "\r",
          '',
          str_replace(
            "\n",
            "",
            $renderedResult
          )
        );
      //);
  }
?>